package cn.edu.scau.cmi.mengzhuorong.composite.consistent;

import java.util.HashSet;
import java.util.Set;

public class Team extends Organization {

	private String name;
	Team(){
		
	}
	public Team(String name) {
		setName(name);
	}
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Override
	public void setParent(Organization parent) {
		this.parent = parent;
	}
	@Override
	public Organization getParent() {
		return this.parent;
	}
	@Override
	public Set<Organization> getChildren() {
		return children;
	}
	@Override
	public void setChildren(Set<Organization> child) {
		this.children = child;
	}
	@Override
	public Organization addChild(Organization child) {
		children.add(child);
		child.setParent(this);
		return this;
	}
	@Override
	public Organization removeChild(Organization child) {
		children.remove(child);
		return this;
	}
}
